const db = uniCloud.database()
/**
 * 枚举评分
 * @param scoreNum {number} 条件
*/
function enumScore(scoreNum) {
	const dbCmd = db.command
	switch (scoreNum) {
		case 0 : 
			return {  } ;
			break;
		case 1 :
			return { "rider.total_score":dbCmd.gte(14) }
			break;
		case 3 :
			return { "rider.total_score": dbCmd.lt(14)  }
			break;
		case 4 :
			return { "rider.total_score": dbCmd.lte(6)  }
			break;
		case 5 :
			return { "shop.total_score":dbCmd.gte(14) }
			break;
		case 6 :
			return { "shop.total_score": dbCmd.lt(14)  }
			break;
		case 7 :
			return { "shop.total_score": dbCmd.lte(6)  }
			break;
	}
}

export {
	enumScore
}
